package com.thoughtworks.biblioteca;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class BookTest {
    Book book=new Book("Lord of the rings","C.S.Lewis",2000,true);
    @Before


    @Test
    public void testGetBookName() throws Exception {
        String actual="Lord of the rings";
        String expected=book.getBookName();
        assertEquals(actual,expected);

    }

    @Test
    public void testGetAuthor() throws Exception {
        String actual="C.S.Lewis";
        String expected=book.getAuthor();
        assertEquals(actual,expected);

    }

    @Test
    public void testGetPublishedYear() throws Exception {
        int actual=2000;
        int expected=book.getPublishedYear();
        assertEquals(actual,expected);

    }

    @Test
    public void testIsAvailable() throws Exception {
        boolean actual=false;
        boolean expected=book.isAvailable();
        assertEquals(actual,expected);

    }
}